package com.scujj.cs6.service;

import com.scujj.cs6.model.dto.WeatherForecastDTO;
import com.scujj.cs6.model.vo.*;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

public interface WeatherService {

    /**
     * 通过adcode获取天气信息
     * @param adcode
     * @return
     */
    WeatherAllVo fetchWeatherByAdcode(String adcode);

    /**
     * 通过IP获取天气信息
     * @param request
     * @return
     */
    WeatherAllVo fetchWeatherByIp(HttpServletRequest request);

    /**
     * 通过百度API获取省会城市天气今日信息
     */
    List<WeatherNowVo> fetchCapitalCitiesLocalWeather();

    /**
     * 通过百度API获取省会城市天气预报信息
     */
    List<WeatherForecastDTO> fetchCapitalCitiesForecasts();

    /**
     * 通过redis获取省会城市实时天气今日小时+位置信息
     */
    RealTimeDataVo<List<WeatherNowVo>> getCapitalCitiesLocalWeather();

    /**
     * 分页获取省会城市天气预报+位置信息
     */
    PageVo<WeatherForecastWithCitiesVo> pageCapitalCitiesWeatherForecast(int page, int size);


}
